net/netip.Prefix.bits (field)
16 uses
net/netip (current package)
netip.go#L1245: bits int16
netip.go#L1268: bits: b16,
netip.go#L1278: func (p Prefix) Bits() int { return int(p.bits) }
netip.go#L1283: func (p Prefix) IsValid() bool { return !p.ip.isZero() && p.bits >= 0 && int(p.bits) <= p.ip.BitLen() }
netip.go#L1288: func (p Prefix) IsSingleIP() bool { return p.bits != 0 && int(p.bits) == p.ip.BitLen() }
netip.go#L1334: if m, err := p.ip.Prefix(int(p.bits)); err == nil {
netip.go#L1363: return uint32((ip.addr.lo^p.ip.addr.lo)>>((32-p.bits)&63)) == 0
netip.go#L1368: return ip.addr.xor(p.ip.addr).and(mask6(int(p.bits))).isZero()
netip.go#L1388: if p.bits < o.bits {
netip.go#L1389: minBits = p.bits
netip.go#L1391: minBits = o.bits
netip.go#L1434: b = appendDecimal(b, uint8(p.bits))
netip.go#L1497: return p.ip.String() + "/" + itoa.Itoa(int(p.bits))
The pages are generated with Golds v0.4.9. (GOOS=linux GOARCH=amd64)